.spin-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 120px;
  max-width: 700px;
}

.main-screen-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 40px;
}

.speaker-wrapper {
  z-index: 0;
  width: fit-content;
  height: fit-content;
  transform: scale(0.4);
  transform-origin: top left;
  transform: translateY(-100px) scale(0.4);
}

.case {
   width: 300px;
   height: 500px;
   border-radius: 5px;
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   background-image: 
     url('https://www.transparenttextures.com/patterns/retina-wood.png'),
     linear-gradient(
       to right,
       #4b2e14 0%,
       #7b3f00 25%,
       #a0522d 50%,
       #cd853f 75%,
       #4b2e14 100%
     );
   box-shadow: 0 0 20px rgba(0, 0, 0, 0.6); 
}
.case.boom {
   animation: boomCase 500ms infinite;
}
.case.boom .rd:before {
   animation: boom2 500ms infinite;
}
.case.boom .rd:after {
   animation: boom1 500ms infinite;
}
.case.boom .brand {
   animation: boomBrand 500ms infinite;
}
.case .brand {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   top: 22px;
   color: #dadada;
   text-align: center;
   width: 300px;
   left: 0;
   z-index: 22;
   font-family: 'Yellowtail', cursive;
   color: #dadada;
   font-size: 15px;
   text-shadow: 2px 2px 1px #000;
   transform: scale(1);
}
.rd {
   margin: 0 auto;
   background: #3e4546;
   box-shadow: inset 0px 0px 3px 3px rgba(0, 0, 0, .4);
   position: relative;
}
.rd#sm {
   width: 120px;
   height: 120px;
   border-radius: 5px;
   border-radius: 100%;
   margin-top: 65px;
   border: 10px solid #2f3030;
}
.rd#big {
   margin-top: 30px;
   width: 200px;
   height: 200px;
   border-radius: 5px;
   border-radius: 100%;
   border: 15px solid #2f3030;
}
.rd:before {
   content: '';
   width: 80%;
   height: 80%;
   border-radius: 5px;
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   border-radius: 100%;
   display: block;
   background: #3e4243;
   background-image: linear-gradient(to top left, #3e4243 10%, #252a2b);
   box-shadow: 0px 0px 5px 3px rgba(0, 0, 0, .6);
   z-index: 1;
}
.rd:after {
   content: '';
   width: 35%;
   height: 35%;
   border-radius: 5px;
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   border-radius: 100%;
   display: block;
   background: #0f1010;
   background-image: radial-gradient(#303435 5%, #000);
   z-index: 3;
   box-shadow: 0px 0px 5px 3px rgba(0, 0, 0, .5);
}
@keyframes boom1 {
   0%, 100% {
     width: 35%;
     height: 35%;
     border-radius: 5px;
     border-radius: 100%;
  }
   20% {
     width: 40%;
     height: 40%;
     border-radius: 5px;
     border-radius: 100%;
     box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, .3);
  }
}
@keyframes boom2 {
   0%, 100% {
     width: 80%;
     height: 80%;
     border-radius: 5px;
     border-radius: 100%;
  }
   20% {
     width: 82%;
     height: 82%;
     border-radius: 5px;
     border-radius: 100%;
     box-shadow: 0px 0px 7px 5px rgba(0, 0, 0, .7);
  }
}
@keyframes boomCase {
   0%, 100% {
     box-shadow: 0px 8px 10px 3px rgba(0, 0, 0, .2);
  }
   20% {
     box-shadow: 0px 10px 20px 5px rgba(0, 0, 0, .7);
  }
}

.spin-main {
  z-index: 1;
}

.main-spin-screen {
  justify-content: center;
  align-items: center;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 15px;
  border: var(--main-border);
  border-bottom: none;
  background: var(--main-container-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--container-shadow);
  gap: 15px;
  z-index: 3;
}

/* .screen-border in main */

.skin-container {
  position: relative;
  min-height: 350px;
  min-width: 350px;
  overflow: hidden;
  border-radius: var(--screen-border-radius);
  background-color: #00ff00;
  box-shadow: var(--screen-edge-dirt);
  border: var(--main-border);
}

#oiia-image {
  max-width: 350px;
  height: 350px;
  -webkit-user-drag: none;
}
#oiia-inside {
  border-radius: 4px;
  position: absolute;
  bottom: 8px;
  right: 8px;
  height: 35px;
}

/* .mini-screen-border in main */

.mini-screen-border.counter-screen {
  width: 70%;
}
#current-timer {
  width: 100%;
  font-family: var(--screen-font-family);
  background-color: var(--content-bg);
  border-radius: inherit;
  appearance: none;           /* Standard */
  -webkit-appearance: none;   /* Safari/Chrome */
  -moz-appearance: none;      /* Firefox */
  text-align: center;
  color: var(--screen-text-color);
  font-size: 1.5rem;
  transition: all 0.1s ease;
}

.controls-panel {
  padding: 15px;
  border: var(--main-border);
  border-bottom: none;
  background: var(--main-container-bg);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius:var(--border-radius);
  box-shadow: var(--container-shadow);
  gap: 15px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.turbo-spin-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  gap: 10px;
  background: var(--controls-bg);
  box-shadow: var(--controls-shadow);                
  border-radius: 2px;
}
.turbo-spin-header {
  font-family: sans-serif;
  font-size: 0.7rem;
  color: var(--main-text-color);
  text-transform: uppercase;
  border: var(--main-border);
  border-radius: 2px;
  padding: 0 10px;
  text-align: center;
}

/* by elijahgummer */ 
.switch {
  position: relative;
  box-sizing: border-box;
  background: #164409;
  border-radius: 6px;
  box-shadow:
    inset 0 1px 1px 1px rgba(0, 0, 0, 0.5),
    0 1px 0 0 rgba(255, 255, 255, 0.1);
  width: 105px;
  height: 25px;
  padding: 1.5px;  
}
.switch input[type="checkbox"] {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.switch input[type="checkbox"] + label {
  position: relative;
  display: block;
  left: 0;
  width: 50%;
  height: 100%;
  background: var(--silver-bg);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  transition: all 0.5s ease-in-out;
}
.switch input[type="checkbox"] + label:before {
  width: 2.5px;
  height: 2.5px;
  margin-left: 5px;
  content: "";
  display: inline-block;
  background: #fff;
  border-radius: 50%;
  vertical-align: middle;
  box-shadow:
    0 0 5px 2px rgba(165, 15, 15, 0.9),
    0 0 3px 1px rgba(165, 15, 15, 0.9);
  transition: all 0.5s ease-in-out;
}
.switch input[type="checkbox"] + label:after {
  content: "";
  display: inline-block;
  width: 0;
  height: 100%;
  vertical-align: middle;
}
.switch input[type="checkbox"] + label i {
  width: 1.5px;
  height: 12px;
  margin-top: -6px;
  margin-left: -0.75px;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 2px;
  background: #164409;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.3);
}
.switch input[type="checkbox"] + label i:before,
.switch input[type="checkbox"] + label i:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: #164409;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.3);
}
.switch input[type="checkbox"] + label i:before {
  left: -3.5px;
}
.switch input[type="checkbox"] + label i:after {
  left: 3.5px;
}
.switch input[type="checkbox"]:checked + label {
  left: 50%;
}
.switch input[type="checkbox"]:checked + label:before {
  box-shadow:
    0 0 5px 2px rgba(15, 165, 70, 0.9),
    0 0 3px 1px rgba(15, 165, 70, 0.9);
}

.player-container {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--main-container-bg);
  border: var(--main-border);
  border-radius: var(--border-radius);
  padding: 15px;
  gap: 15px;
  transform-style: preserve-3d;
  box-shadow: 
    inset 0 0 5px #000,
    0 2px 1px -1px #C1BEB5 inset,
    0 -2px 1px -1px #FCFCFA inset,
    1px 0 0.5px -0.5px #DFDFD7 inset,
    -2.5px 0 1px -1px #D4CDC5 inset;
  z-index: 1;
}
.player-container::before {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, #5eb924, #3b7f18);
  border-radius: inherit;
  box-shadow:
    0 0 0 1px #164409,
    0 10px 10px rgba(0, 0, 0, 0.6), 
    inset 0 1px 2px rgba(255, 255, 255, 0.15),
    inset 0 -2px 6px rgba(0, 0, 0, 0.4);
  transform: translate3d(0, .75em, -1em);
}

.music-player {
  padding: 15px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--controls-bg);
  box-shadow: var(--controls-shadow);    
  border-radius: 2px;
}

.button3d#next-song,
.button3d#random-song,
.button3d#prev-song {
  padding: 0.7em 1.3em;;
}

.song-select {
  font-family: var(--screen-font-family);
  background-color: var(--content-bg);
  border-radius: inherit;
  appearance: none;           /* Standard */
  -webkit-appearance: none;   /* Safari/Chrome */
  -moz-appearance: none;      /* Firefox */
  text-align: center;
  color: var(--screen-text-color);
  font-size: 1.5rem;
  transition: all 0.1s ease;
  min-width: 40ch;
  max-width: 40ch;
}

.mode-toggles {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}
.toggle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.toggle-label {
  font-family: sans-serif;
  font-size: 0.6rem;
  color: var(--main-text-color);
  text-transform: uppercase;
  border: var(--main-border);
  border-radius: 2px;
  padding: 0px 8px;
  text-align: center;
  white-space: wrap;
  margin-bottom: 5px;
}

@media (max-width: 768px) {
  .spin-container {
    margin-top: 90px;
    max-width: 450px;
  }
  .main-screen-wrapper {
    gap: 10px;
  }
  .main-spin-screen {
    padding: 10px;
    gap: 10px;
  }

  .speaker-wrapper {
    transform: scale(0.2);
    transform: translateY(-50px) scale(0.2);
  }

  /* .screen-border in main */

  .skin-container {
    min-height: 200px;
    min-width: 200px;
  }

  #oiia-image {
    max-width: 200px;
    height: 200px;
  }
  #oiia-inside {
    bottom: 5px;
    right: 5px;
    height: 25px;
  }
  /* .mini-screen-border in main */

  .mini-screen-border.counter-screen {
    width: 60%;
  }
  #current-timer {
    font-size: 1rem;
  }

  .controls-panel {
    gap: 10px;
  }

  .spin-button-frame {
    padding: 4px;
    border-radius: 16px;   
  }
  .spin-button {
    border-radius: 16px;
    padding: 1em 0.8em;
    font-size: 0.6rem;
    font-weight: bold;
  }

  .turbo-spin-header {
    font-size: 0.5rem;
    padding: 0 10px;
  }

  .switch {
    width: 70px;
    height: 17px;
    padding: 1px;  
  }
  .switch input[type="checkbox"] + label:before {
    width: 1.67px;
    height: 1.67px;
    margin-left: 3.33px;
    margin-top: -9px;
  }
  .switch input[type="checkbox"] + label i {
    width: 1px;
    height: 8px;
    margin-top: -4px;
    margin-left: -0.5px;
  }
  .switch input[type="checkbox"] + label i:before {
    left: -2.33px;
  }
  .switch input[type="checkbox"] + label i:after {
    left: 2.33px;
  }

  .player-container {
    padding: 10px;
    gap: 10px;
  }

  .music-player {
    padding: 10px;
    gap: 5px;
  }

  .button3d#next-song,
  .button3d#random-song,
  .button3d#prev-song {
    padding: 0.7em 1.1em;
  }

  .song-select {
    height: 1.5rem;
    font-size: 1rem;
    min-width: 25ch;
    max-width: 25ch;
  }

  .mode-toggles {
    width: 100%;
  }
  .toggle-item {
    gap: 5px;
  }
  .toggle-label {
    font-size: 0.5rem;
    border-radius: 2px;
    padding: 0px 8px;
    margin-bottom: 5px;
  }
}
